<template>
  <div>
    <DetailPage
      v-bind="ExtendFormConfig"
      :model="ExtendMod"
      style="width: 98%; margin: 0 auto">
      <template v-slot:dpSenileProductsPOList="{ row }">
        <ApldTable
          :columns="row.column"
          :data="tableData.dpSenileProductsPOList"></ApldTable>
      </template>
      <template v-slot:dpFacilityEquipmentPOList="{ row }">
        <ApldTable
          :columns="row.column"
          :data="tableData.dpFacilityEquipmentPOList"></ApldTable>
      </template>
    </DetailPage>
  </div>
</template>

<script setup lang="ts">
import { ApldTable } from '@/components/AplidCrud'
import DetailPage from '@/views/aplid/DetailPage/index.vue'
import { ExtendFormConfig } from '@/views/datacenter/basicData/serviceFacility/config'
const rowData: any = inject('nowRowData')

let tableData:any = ref({})
const props = defineProps({
	chainViewInfo:{
		type:Object,
		default:()=>({})
	},
	isBlockchain:{
		type:Boolean,
		default:false
	}
})
let ExtendMod = ref()
if(props.isBlockchain){
  ExtendMod.value = props.chainViewInfo
  tableData.dpSenileProductsPOList = props.chainViewInfo.bcSenileProducts?JSON.parse(props.chainViewInfo.bcSenileProducts):[]
  tableData.dpFacilityEquipmentPOList =props.chainViewInfo.bcFacilityEquipment?JSON.parse(props.chainViewInfo.bcFacilityEquipment):[]
}else{
  ExtendMod.value = rowData.value.dpServiceFacilityExtend || {}
  tableData.value = rowData.value || {}
}


</script>

<style scoped></style>
